/**
 *
 */
package com.ybkj.daijia.server.service.impl;

import com.ybkj.daijia.server.mapper.FirstOrderPassengerMapper;
import com.ybkj.daijia.server.model.FirstOrderPassenger;
import com.ybkj.daijia.server.service.FirstOrderPassengerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Shine
 *
 */
@Service
public class DefaultFirstOrderPassengerService implements FirstOrderPassengerService {

    @Autowired
    private FirstOrderPassengerMapper firstOrderPassengerMapper;

    @Override
    public Long selectAll(Long passengerId, String type) {
        Long count = firstOrderPassengerMapper.selectAll(passengerId, type);
        if (null == count) {
            count = 0L;
        }
        return count;
    }

    @Override
    public Long insert(FirstOrderPassenger firstOrderPassenger) {
        return firstOrderPassengerMapper.insertRecord(firstOrderPassenger);
    }

}
